% 

x = [0.01:0.01:1.5];
y1 = x.^2;
y2 = 1 - exp(-x.^2);
options = [];
options.colors = [1 0 0; 0 0 0];
% options.legend = {'L2', 'CIM'};
options.lineStyles = {'-', '-.'};
% options.markers =  {'o', 's'};
options.xlabel = 'reconstruction error';
options.ylabel = 'loss function';
gg = prettyPlot(x, [y1;y2], options);
hold on;
legend('L2', 'CIM', 'Location', 'NorthWest');

save2pdf('loss_func.pdf',gcf,600);

hold off;
x = [0.01:0.01:1.5];
y1 = ones(1,length(x));
y2 = exp(-x.^2);
options = [];
options.colors = [1 0 0; 0 0 0];
options.ylimits = [0,2];
% options.legend = {'L2', 'CIM'};
options.lineStyles = {'-', '-.'};
options.xlabel = 'reconstruction error';
options.ylabel = 'weight function';
% options.markers =  {'o', 's'};
gg = prettyPlot(x, [y1;y2], options);
hold on;
legend('L2', 'CIM', 'Location', 'NorthWest');

save2pdf('weight_func.pdf',gcf,600);

hold off;